﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Adaptive.Foundation.CodeDom.Native
{
    [ComImport, Guid("35299EEC-11EE-4518-9F08-401638D1D3BC"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    internal interface IVsUIShellOpenDocument
    {
        bool IsDocumentOpen(IVsHierarchy pHierCaller, int itemidCaller, [MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidLogicalView, int grfIDO, [Out, MarshalAs(UnmanagedType.LPArray)] IVsHierarchy[] ppHierOpen, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pitemidOpen, [Out, MarshalAs(UnmanagedType.LPArray)] IVsWindowFrame[] ppWindowFrame);
        int IsDocumentInAProject([MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, [Out, MarshalAs(UnmanagedType.LPArray)] IVsHierarchy[] ppUIH, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pitemid, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface)] object[] ppSP);
        IVsWindowFrame OpenDocumentViaProject([MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidLogicalView, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface)] object[] ppSP, [Out, MarshalAs(UnmanagedType.LPArray)] IVsHierarchy[] ppHier, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pitemid);
        IVsWindowFrame OpenStandardEditor(int oseOpenDocEditor, [MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidLogicalView, [MarshalAs(UnmanagedType.LPWStr)] string pszOwnerCaption, IVsHierarchy pHier, int itemid, [MarshalAs(UnmanagedType.Interface)] object punkDocDataExisting, [MarshalAs(UnmanagedType.Interface)] object pSP);
        void OpenStandardPreviewer(int ospOpenDocPreviewer, [MarshalAs(UnmanagedType.LPWStr)] string pszURL, int resolution, int dwReserved);
        [return: MarshalAs(UnmanagedType.Interface)]
        object GetStandardEditorFactory(int dwReserved, ref Guid pguidEditorType, [MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidLogicalView, [Out, MarshalAs(UnmanagedType.LPArray)] string[] pbstrPhysicalView);
        [return: MarshalAs(UnmanagedType.BStr)]
        string MapLogicalView(ref Guid rguidEditorType, ref Guid rguidLogicalView);
        IVsWindowFrame OpenSpecificEditor(int grfCDW, [MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidEditorType, [MarshalAs(UnmanagedType.LPWStr)] string pszPhysicalView, ref Guid rguidLogicalView, [MarshalAs(UnmanagedType.LPWStr)] string pszOwnerCaption, [MarshalAs(UnmanagedType.Interface)] IVsHierarchy pHier, int itemid, [MarshalAs(UnmanagedType.Interface)] object punkDocDataExisting);
        IVsWindowFrame InitializeEditorInstance(int grfIEI, [MarshalAs(UnmanagedType.Interface)] object punkDocView, [MarshalAs(UnmanagedType.Interface)] object punkDocData, [MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidEditorType, [MarshalAs(UnmanagedType.LPWStr)] string pszPhysicalView, ref Guid rguidLogicalView, [MarshalAs(UnmanagedType.LPWStr)] string pszOwnerCaption, [MarshalAs(UnmanagedType.LPWStr)] string pszEditorCaption);
        int IsSpecificDocumentViewOpen(IVsHierarchy pHierCaller, int itemidCaller, [MarshalAs(UnmanagedType.LPWStr)] string pszMkDocument, ref Guid rguidEditorType, [MarshalAs(UnmanagedType.LPWStr)] string pszPhysicalView, int grfIDO, [Out, MarshalAs(UnmanagedType.LPArray)] IVsHierarchy[] ppHierOpen, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pitemidOpen, [Out, MarshalAs(UnmanagedType.LPArray)] IVsWindowFrame[] ppWindowFrame);
    }
}
